<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="../include.jsp" %>

<!DOCTYPE html>
<html>
<head>
	<%@include file="../include.jsp"%>
</head>
<body id="z_body">
	<div class="panel">
		<div class="panel-heading">
			<i class="icon icon-list"></i> 
			${actName}PDT通话组
		</div>
		<div class="panel-body">
		
			<form class="form-horizontal" id="form1">
				<input name="act" value="${act}" type="hidden"/>
				
				<c:if test="${act=='add'}">
					<div class="form-group">
						<label class="col-md-3 app_required">通话组编号</label>
						<div class="col-md-6">
							<input class="form-control" name="thzbh" value="${one.thzbh}" validType="notEmpty">
						</div>
					</div>
				</c:if>
				
				<c:if test="${act=='update'}">
					<div class="form-group">
						<label class="col-md-3 app_required">通话组编号</label>
						<div class="col-md-6">
							<input class="form-control" name="thzbh" value="${one.thzbh}" readonly="readonly">
						</div>
					</div>
				</c:if>
				
				<div class="form-group">
					<label class="col-md-3 app_required">通话组名称</label>
					<div class="col-md-6">
						<input class="form-control" name="thzmc" value="${one.thzmc}" validType="notEmpty">
					</div>
				</div>
				
				
				<shiro:hasRole name="admin">
					<div class="form-group">
						<label class="col-md-3 app_required">所属单位</label>
						<div class="col-md-6">
							<input name="zzjgdm" value="${one.zzjgdm}" type="hidden">
							<input class="form-control app_selector" name="zzjgmc" value="${one.zzjgmc}" validType="notEmpty" data_tree="{type:'organ'}">
						</div>
					</div>
				</shiro:hasRole>
				<shiro:lacksRole name="admin">
					<div class="form-group">
						<label class="col-md-3 app_required">所属单位</label>
						<div class="col-md-6">
							<input class="form-control" name="" value="${loginUser.ssdwmc}" readonly="readonly">
						</div>
					</div>
				</shiro:lacksRole>
				
				<div class="form-group">
					<label class="col-md-3 app_required">通话组类型</label>
					<div class="col-md-6">
						<input name="thzlx" value="${one.thzlx}" validType="notEmpty" type="hidden">
						<input class="form-control app_selector" value="${one.thzlx_}" validType="notEmpty" data_tree="{type:'pdtthzlx'}">
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-md-3"></label>
					<div class="col-md-6">
						<a class="btn btn-primary" onclick="save()">保存</a> &nbsp;
						<a class="btn btn-default" onclick="history.go(-1)">取消</a>
					</div>
				</div>
				
			</form>
			
		</div>
	</div>
	
	
<script type="text/javascript">
/**
 * 保存
 */
function save() {
	//提交
	if(validateForm("form1")) {//表单验证
		tool.save("save", $("#form1").serialize(), function(data) {//提交
			setTimeout(function(){
				history.go(-1);
			}, 800);
		});
	}
}
	
</script>
</body>
</html>